﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Configuration;

namespace OpenExpressApp.WPF
{
    /// <summary>
    /// Interaction logic for WorkDesk.xaml
    /// </summary>
    public partial class WorkDesk : UserControl
    {
        public WorkDesk()
        {
            InitializeComponent();
            this.SetValue(Window.TitleProperty, "主页");
            string homePage = ConfigurationManager.AppSettings["HomePage"];
            if (null != homePage)
            {
                tbUri.Text = homePage;
                OpenPage(tbUri, new RoutedEventArgs());
            }
        }

        private void OpenPage(object sender, RoutedEventArgs e)
        {
            frame1.Source = new Uri(tbUri.Text);
        }
    }
}
